package com.solcoo.common.network;

import java.io.InputStream;

import org.apache.http.HttpStatus;

/**
 * @author yuanfang
 * @verson 创建时间 2012-8-9 下午2:54:24
 */
public class HttpResult {

	public static final int API_RESULT_NETWORK_CLOSE = -3;

	public static final int API_RESULT_NETWORK_ERROR = -4;

	public static final int API_RESULT_NETWORK_TIMEOUT = -5;

	public static final int API_RESULT_SYSTEM_ERROR = -6;

	public static final int API_RESULT_FAILED = -10002;

	public HttpResult(int code) {
		resultCode = code;
	}

	public int resultCode; // 返回状态码，见HttpStatus
	public byte[] data;// 数据
	public InputStream input;

	public boolean isSuccess() {
		return resultCode == HttpStatus.SC_OK;
	}
}
